package cn.tedu.qxhouserent.house.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.math.BigDecimal;

@Data
public class LeaseHouseUpdateInfoParam implements Serializable {
    @NotEmpty(message = "修改房源失败,必须提交标题")
    @ApiModelProperty(value = "标题",required = true,example = "qqq")
    private String name;

    @NotEmpty(message = "修改房源失败,必须提交主图")
    @ApiModelProperty(value = "主图",required = true)
    private String majorImage;

    @NotNull(message = "修改房源失败,必须提交价格")
//    @Pattern(regexp = "(^[1-9]{1}(\\d{1,2}(\\,\\d{3})*|\\d{0,})(\\.\\d{1,2})?$)",message = "修改房源失败,价格不合法")
    @ApiModelProperty(value = "价格",required = true)
    private BigDecimal price;

    @NotNull(message = "修改房源失败,必须提交面积")
//    @Pattern(regexp = "(^[1-9]{1}(\\d{1,2}(\\,\\d{3})*|\\d{0,})(\\.\\d{1,2})?$)",message = "修改房源失败,面积不合法")
    @ApiModelProperty(value = "面积",required = true)
    private BigDecimal area;

    @NotEmpty(message = "修改房源失败,必须提交户型")
    @ApiModelProperty(value = "户型",required = true)
    private String houseType;

    @NotNull(message = "修改房源失败,必须提交楼层")
//    @Pattern(regexp = "(^[1-9]\\d*$)",message = "修改房源失败,楼层不合法")
    @ApiModelProperty(value = "楼层",required = true)
    private Integer floor;

    @NotNull(message = "修改房源失败,必须提交最高楼层")
//    @Pattern(regexp = "(^[1-9]\\d*$)",message = "修改房源失败,楼层不合法")
    @ApiModelProperty(value = "最高楼层",required = true)
    private Integer maxFloor;

    @NotEmpty(message = "修改房源失败,必须提交房源相关图")
    @ApiModelProperty(value = "房源相关图",required = true)
    private String houseImage;

    @NotEmpty(message = "修改房源失败,必须提交小区简介")
    @ApiModelProperty(value = "小区简介",required = true)
    private String communityDescription;

    @NotNull(message = "修改房源失败,必须提交电梯")
    @Range(min = 0,max = 1,message = "修改房源失败,是否有电梯提交不合法")
    @ApiModelProperty(value = "电梯",required = true)
    private Integer hasElevator;

    @NotNull(message = "必须提交是否推荐")
    @Range(min = 0,max = 1,message = "修改房源失败,是否推荐提交不合法")
    @ApiModelProperty(value = "是否推荐",required = true)
    private Integer recom;

    @NotNull(message = "修改房源失败,必须提交区域")
    @ApiModelProperty(value = "区域id",required = true)
    private Long sectionId;

    @NotNull(message = "修改房源失败,必须提交朝向")
    @ApiModelProperty(value = "朝向id",required = true)
    private Long orientationId;

    @NotNull(message = "修改房源失败,必须提交经纪人")
    @ApiModelProperty(value = "经纪人id",required = true)
    private Long agentId;

    @NotNull(message = "修改房源失败,必须提交房源分类")
    @ApiModelProperty(value = "房源分类id",required = true)
    private Long houseCategoryId;

    @NotNull(message = "修改房源失败,必须提交出租时长")
    @ApiModelProperty(value = "出租时长",required = true)
    private String leaseTime;

    @NotNull(message = "修改房源失败,必须提交出租类型")
    @ApiModelProperty(value = "出租类型",required = true)
    private Long leaseTypeId;


}
